function [signals,PC,V] = pcaReduce(data, dimensions)
% pca1: Perform PCA dimension reduction
% using convariance.
%       data - MxN matrix of input data
%              (M dimensions, N trials)
% dimensions - number of remaining dimensions
%              after reduction
%    signals - MxN matrix of projected data
%         PC - each column is a PC
%          V - Mx1 matrix of variances
[sig,PC,V] = pca1(data);
signals = sig(:, 1:dimensions);
